Register-Lib -Name PowerShell.Session -Depends PowerShell.Logging

function Ensure-PSSnapin($name){
    Log "Ensuring snapin: $name"
    if ( (Get-PSSnapin -Name $name -ErrorAction SilentlyContinue) -eq $null )
    {
        Add-PsSnapin $name
    }
}

function WaitToContinue($msg = "Press any key to continue ...")
{
    Log $msg    
    $x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
}


function Reload-Profile {
    @(
        $Profile.AllUsersAllHosts,
        $Profile.AllUsersCurrentHost,
        $Profile.CurrentUserAllHosts,
        $Profile.CurrentUserCurrentHost
    ) | % {
        if(Test-Path $_){
            Write-Verbose "Running $_"
            . $_
        }
    }
	 
}

Set-Alias hf Help-Full -Option AllScope
function Help-Full ($name) {	
	help -ful $name
}
